import React, { Component } from "react";

class Child1 extends Component {
  state = { count: 10 };

  fn = () => {
    this.props.onAbc(this.state.count);
  };

  render() {
    console.log(this);
    return (
      <div>
        这是child1组件 - {this.state.count} -{" "}
        <button onClick={this.fn}>btn</button>
      </div>
    );
  }
}

export default Child1;
